﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace myFinance.DAL
{
    static class DALFactory
    {
        static IDAL dalProvider; 

        public static IDAL GetDAL<T>() where T : class, new() 
        {
            if (dalProvider != null && dalProvider is T)
                return dalProvider;
            else
                return dalProvider = (IDAL)new T();
        }
    }
}
